package br.edu.fcsl.persistencia;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;


public class Conexoes {

	private static Connection con;
public static Connection getConnection() {
		
		if(con == null){
		try {
			Class.forName("com.mysql.jdbc.Driver");
			con = DriverManager.getConnection("jdbc:mysql://localhost/e_comerce","root","");			
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		} catch (SQLException e) {
			e.printStackTrace();
		}
		}
		return con;
	}
	
}
